Dim gebizSite
gebizSite="http://gebiz.ncs.com.sg"

Dim sCurPath
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")

Dim genFileName
genFileName = sCurPath & "\" & "test.xlsx"

Dim htmlFilePathName
htmlFilePathName="15092011\ITQ\AVA000ETQ11000457.htm"
Set fso = CreateObject("Scripting.FileSystemObject")


Set htmlFileNamePath = fso.GetFile(sCurPath & "\" & htmlFilePathName)

Dim htmlFileNameStr
htmlFileNameStr = htmlFileNamePath.Name

Dim htmlTypeStr
htmlTypeStr = htmlFileNamePath.ParentFolder.Name

Dim htmlDateStr
htmlDateStr = htmlFileNamePath.ParentFolder.ParentFolder.Name

Wscript.Echo htmlFileNameStr
Wscript.Echo htmlTypeStr
Wscript.Echo htmlDateStr

Dim dotPos
dotPos=InStr(htmlFileNameStr,".")
Wscript.Echo dotPos

Dim folderName
folderName=(Mid(htmlFileNameStr,1,(18-1))) & "_files"
Wscript.Echo folderName




Wscript.Echo (sCurPath & "\" & folderName)
Set folder = fso.GetFolder("D:\myprojects\vsprojects\vbscriptsproj\vbscriptsproj\AVA000ETQ11000457_files")
Set files = folder.Files

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Add()
objExcel.Cells(1, 1).Value = "Test value"
'objExcel.Visible = True


objWorkbook.SaveAs(genFileName)

objExcel.Quit






